<!-- 系列商品列表 -->
<?php include '../base/header.php' ?>

<div class="uk-child-width-1-3@m" uk-grid>
    <?php
    require_once '../sql/connection.php';

    $series_id = $_GET['id'];
    // 查询语句
    $sql_config = "select * from commodity WHERE series_id = $series_id";
    // 连接数据库，并查询
    $result_config = mysqli_query($GLOBALS['conn'], $sql_config);
    // 循环输出改系列所有商品
    while ($row = mysqli_fetch_array($result_config)) {
        echo "<div>
                <div class='uk-card uk-card-default uk-card-hover'>
                    <div class='uk-card-media-top'>
                        <!-- 商品图片图片 -->
                        <img src='$row[6]small_01.jpg' alt='' class='uk-align-center'>
                    </div>
                    <div class='uk-card-body uk-text-center'>
                        <h3 class='uk-card-title'>
                            <a href='/page/public/detail.php?com_id=$row[0]' >$row[1]</a>
                          </h3>
                        <p>
                            零售价：$row[3]￥
                        </p>
                    </div>
                </div>
            </div>";
    }

    ?>
</div>

<?php include '../base/footer.php' ?>
